package com.sgam.mf.domain.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import com.sgam.mf.domain.ref.RefBank;
import com.sgam.utils.CustomDateDeserializer;
import com.sgam.utils.CustomDateSerializer;

@Entity
@Table(name = "CONTRACT_PAYMENTS")
public class ContractPayments {

		@Id
		@Column(name = "id")
		@GeneratedValue
		private Integer id;
		
		@Column(name = "contract_id_fk") 
		private Integer contractIdFk;
		
		@Column(name = "personal_fk") 
		private Integer personalFk;		
		
		@Column(name = "partener_fk") 
		private Integer partenerFk;
		
//		@ManyToOne
//		@JoinColumn(name = "partener_fk", nullable = true)	
//	    private RegPartners regPartners;
		

		@Column(name = "amount") 
		private Long amount;

		@JsonSerialize(using = CustomDateSerializer.class)
		@JsonDeserialize(using = CustomDateDeserializer.class)
		@DateTimeFormat(pattern="dd.MM.yyyy")
		@Column(name = "date_trans") 
		private Date dateTrans;
		
		@Column(name = "comments") 
		private String comments;

		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public Long getAmount() {
			return amount;
		}

		public void setAmount(Long amount) {
			this.amount = amount;
		}
		
		public Date getDateTrans() {
			return dateTrans;
		}

		public void setDateTrans(Date dateTrans) {
			this.dateTrans = dateTrans;
		}

		public String getComments() {
			return comments;
		}

		public void setComments(String comments) {
			this.comments = comments;
		}

		public Integer getContractIdFk() {
			return contractIdFk;
		}

		public void setContractIdFk(Integer contractIdFk) {
			this.contractIdFk = contractIdFk;
		}

		public Integer getPersonalFk() {
			return personalFk;
		}

		public void setPersonalFk(Integer personalFk) {
			this.personalFk = personalFk;
		}

		public Integer getPartenerFk() {
			return partenerFk;
		}

		public void setPartenerFk(Integer partenerFk) {
			this.partenerFk = partenerFk;
		}


		

}
